package DAO;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Collection;

import javax.sql.RowSet;

import sun.font.CreatedFontTracker;

import Classes.Hospede;
import DAO.HospedeDAO;

public class MYSQLHospedeDAO implements HospedeDAO {

	@Override
	public int insertHospede() {

		
		Connection conn = MYSQLDAOFactory.createConnection();
		try
		{
			Statement stm = conn.createStatement();
		    ResultSet rs = stm.executeQuery("SELECT nome FROM hospede");
		    while (rs.next()) {  
		        String nome = rs.getString("nome");		        
		        System.out.println(nome);
		    }  

		}
		catch(SQLException e)
		{
			String nome = e.getMessage() ;
			System.out.println(nome);
		}
		return 0;
	}

	@Override
	public boolean deleteHospede() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public Hospede findHospede() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean updateHospede() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public RowSet selectCustomersRS() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Collection selectHospedeTO() {
		// TODO Auto-generated method stub
		return null;
	}

}